package org.example.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import org.example.domain.entity.Tag;

@Mapper
public interface TagMapper extends BaseMapper<Tag> {
    //删除标签，注意是逻辑删除，所以不能使用mybatisplus提供的，我们要自己使用mybatis写SQL语句
    @Update("update sg_blog.sg_tag set del_flag = 1 where id = #{id}")
    int myUpdateById(@Param("id") Long id, @Param("flag") int flag);

}